BNS Inbound Break-fix case ebonding API to be used by CallTek.
10/22/2024

Only Create payloads are here.

Update payloads will be worked on next and will be shared later but
the API endpoint will be exactly the same.


SNOW Dev Creds:  UserId: calltekebonding   Pass: <TBD>

POST https://attwifidev.service-now.com/api/now/import/x_attsw_ecaltek_00_att_calltek_ebonding
Content-Type		application/json
Accept				application/json


=============================================================
Good Create case payload:
{
    "u_state": "New",
    "u_external_ticket_number": "CALLTEK0001",
    "u_short_description": "CallTekTesting 1 SD",
    "u_description": "CallTekTesting 1 description",
    "u_comments": "CallTekTesting 1 comments",
    "u_start_time": "2024-10-17 12:01:00",
    "u_severity": "Sev-4",
    "u_channel": "Phone",
    "u_category": "Misc.",
    "u_subcategory": "Non Categorized",
    "u_customer_location_id": "a03Db00000BSyTYIA1",
    "u_asset_id": "02iDb00000BmzW2IAJ"
}

Response payload: HTTP Status: 201
{
    "import_set": "ISET0050900",
    "staging_table": "x_attsw_ecaltek_00_att_calltek_ebonding",
    "result": [
        {
            "transform_map": "ATT CallTek Ebonding Transform",
            "table": "sn_customerservice_case",
            "display_name": "number",
            "display_value": "CS1661447",
            "record_link": "https://attwifidev.service-now.com/api/now/table/sn_customerservice_case/327e171b1b1d52506d2c85d4604bcb1e",
            "status": "inserted",
            "sys_id": "327e171b1b1d52506d2c85d4604bcb1e",
            "u_att_ticket_number": "CS1661447",
            "u_external_ticket_number": "CALLTEK0001"
        }
    ]
}

=============================================================

Missing required fields in Create case payload:
{
    "u_state": "New",
    "u_external_ticket_number": "CALLTEK0001",
    "u_short_description": "CallTekTesting 1 SD",
    "u_description": "CallTekTesting 1 description",
    "u_comments": "CallTekTesting 1 comments",
    "u_start_time": "2024-10-17 12:01:00",
    "u_severity": "Sev-4",
    "u_channel": "Phone",
    "u_category": "Misc.",
    "u_subcategory": "Non Categorized",
    "u_customer_location_id": "",
    "u_asset_id": ""
}

Response payload: HTTP Status: 201 (Note the "status" field is set with 'error' and "error_message" set with cause):
{
    "import_set": "ISET0050900",
    "staging_table": "x_attsw_ecaltek_00_att_calltek_ebonding",
    "result": [
        {
            "transform_map": "ATT CallTek Ebonding Transform",
            "table": "sn_customerservice_case",
            "status": "error",
            "error_message": "Invalid payload received. Fields: u_customer_location_id is required.; Target record not found",
            "u_external_ticket_number": "CALLTEK0001"
        }
    ]
}

=============================================================

Missing required fields and invalid field values in Create case payload:
{
    "u_state": "Open",
    "u_external_ticket_number": "CALLTEK0001",
    "u_short_description": "CallTekTesting 1 SD",
    "u_description": "CallTekTesting 1 description",
    "u_comments": "CallTekTesting 1 comments",
    "u_start_time": "2024-10-17 12:01:00",
    "u_severity": "Sev-4",
    "u_channel": "Phone",
    "u_category": "Misc.",
    "u_subcategory": "Non Categorized",
    "u_customer_location_id": "",
    "u_asset_id": ""
}

Response payload: HTTP Status: 201 (Note the "status" field is set with 'error' and "error_message" set with cause):
{
    "import_set": "ISET0050900",
    "staging_table": "x_attsw_ecaltek_00_att_calltek_ebonding",
    "result": [
        {
            "transform_map": "ATT CallTek Ebonding Transform",
            "table": "sn_customerservice_case",
            "status": "error",
            "error_message": "Invalid payload received. Fields: u_customer_location_id is required.,u_state has an invalid value: Open.; Target record not found",
            "u_external_ticket_number": "CALLTEK0001"
        }
    ]
}

=============================================================

Response when credentials are incorrect:
Response payload: HTTP Status: 401
{
    "error": {
        "message": "User Not Authenticated",
        "detail": "Required to provide Auth information"
    },
    "status": "failure"
}